<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="__PUBLIC__/echarts/echarts.min.js"></script>
    <link rel="stylesheet" href="__PUBLIC__/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="__PUBLIC__/font-awesome/css/font-awesome.min.css" media="all">
    <link rel="stylesheet" href="__CSS__/admin.css"  media="all">
</head>
<style>

    .layui-table th, .layui-table td{
        padding: 9px 6px;
        text-align: center;
    }
    .operation-menu a{
        margin: 5px 0;!important;
    }
    /*.layui-form select{*/
    /*display: inline-block;*/
    /*}*/
</style>
<body>
<div class="layui-fluid main">
    <fieldset class="layui-elem-field site-demo-button" style="margin-top: 30px;border:0">
        <div class="layui-form-item" style="float: left;">
            <form class="layui-form serch" action="{:url('admin/Finance/index')}" method="post">
                <div class="layui-form-item" style="float: left;">


                    <!--<div class="layui-input-inline">-->
                    <!--<input type="text" name="order_no" lay-verify="title" autocomplete="off" placeholder="请输入会员名" class="layui-input layui-btn-sm">-->
                    <!--</div>-->
                    <div class="layui-input-inline">
                        <div class="layui-inline">
                            <select name="business_way" lay-search="">
                                <option value="">交易方式</option>
                                <option value="1" {if isset($wherelist['business_way']) AND $wherelist['business_way']==1 }selected{/if}>消费</option>
                                <option value="2" {if isset($wherelist['business_way']) AND $wherelist['business_way']==2 }selected{/if}>提现</option>
                                <option value="3" {if isset($wherelist['business_way']) AND $wherelist['business_way']==3 }selected{/if}>充值</option>
                                <option value="4" {if isset($wherelist['business_way']) AND $wherelist['business_way']==4 }selected{/if}>退款</option>
                            </select>
                        </div>
                    </div>


                    <div class="layui-input-inline">
                        <input type="text" name="creattime" value="{if isset($wherelist['creattime'])}{$wherelist['creattime']}{/if}"  id="test" lay-verify="title" autocomplete="off" placeholder="请选择查询时间段" class="layui-input layui-btn-sm">
                    </div>



                    <button class="layui-btn layui-btn-danger layui-btn-sm" lay-submit="" lay-filter="serch">搜索</button>

                </div>
            </form>

        </div>
    </fieldset>
    <table class="layui-table" lay-even="" lay-skin="line">
        <colgroup>
            <col width="8%">
            <col width="8%">
            <col width="8%">
            <col width="8%">
            <col width="8%">
            <col width="12%">
            <col width="12%">
            <col width="12%">
            <col width="12%">


        </colgroup>
        <thead>

        <tr>
            <th>ID</th>
            <th>会员名</th>
            <th>操作人</th>
            <th>交易金额</th>
            <th>交易方式</th>
            <th>描述</th>
            <th>创建时间</th>
            <!-- <th>更新时间</th> -->
        </tr>
        </thead>
        <tbody>
        <tr>

            {volist name='F' id='vo'}
            <td>{$vo.accounts_id}</td>
            <td>{$vo.member.member_nickname}</td>
            <td> {$vo.admin.nickname}</td>
            <td> {$vo.accounts_money}</td>
            <td>
                {switch name="vo.business_way"}
                {case value="1"}消费{/case}
                {case value="2"}提现{/case}
                {case value="3"}充值{/case}
                {case value="4"}退款{/case}
                {default /}default
                {/switch}
            </td>



            <td>{$vo.description}</td>

            <td>{$vo.creattime}</td>
            <!-- <td>{$vo.updatetime|date='Y-m-d H:i:s',###}</td> -->

        </tr>
        {/volist}
        </tbody>
    </table>
    <div>{$F->render()}</div>

    <script src="__PUBLIC__/layui/layui.js"></script>
    <script src="__PUBLIC__/jquery/jquery.min.js"></script>

    <script>
        var message;
        layui.config({
            base: '__JS__/',
            version: '1.0.1'
        }).use(['app', 'message'], function() {
            var app = layui.app,
                $ = layui.jquery,
                layer = layui.layer;
            //将message设置为全局以便子页面调用
            message = layui.message;
            //主入口
            app.set({
                type: 'iframe'
            }).init();
        });
    </script>
    <script type="text/javascript">


        layui.use(['layer', 'form','laydate'], function(){
            var layer = layui.layer
                ,form = layui.form;
            var laydate = layui.laydate;

            laydate.render({
                elem: '#test'
                ,range: true
                ,format: 'yyyy/MM/dd'

            });
        });








        $('.delete').click(function(){
            var id = $(this).attr('codeid');

            layer.confirm('确定要删除?', function(index) {
                $.ajax({
                    url:"{:url('admin/coupon/delcoupon')}",
                    data:{id:id},
                    success:function(res) {
                        layer.msg(res.msg);
                        if(res.code == 1) {
                            setTimeout(function(){
                                location.reload();
                            },1500)
                        }
                    }
                })
            })
        })
        $('.shelves').click(function(){
            var id = $(this).attr('codeid');
            var goods_status= $(this).attr('data-id');
            layer.confirm('是否确定取消订单？，取消后不可恢复', function(index) {
                $.ajax({
                    url:"{:url('admin/order/cancel')}",
                    data:{id:id,goods_status:goods_status},
                    success:function(res) {
                        layer.msg(res.msg);
                        if(res.code == 1) {
                            setTimeout(function(){
                                location.reload();
                            },1500)
                        }
                    }
                })
            })
        })



    </script>
    <script type="text/javascript">
        layui.use('layer', function(){
            var layer = layui.layer;
            $('.a_menu').click(function(){
                var url = $(this).attr('href');
                var a = 0;
                $.ajax({
                    url:url
                    ,async:false
                    ,success:function(res){
                        if(res.code == 0) {
                            layer.msg(res.msg);
                            a = 1;
                        }
                    }
                })
                if(a === 0) {
                    layer.open({
                        type:2,
                        content:url,
                        area: ['700px', '680px'],
                        end:function(){
                            location.reload();
                        }
                    });
                }
                return false;
            })

            $('.preview').click(function(){
                var url = $(this).attr('href');
                layer.open({
                    type:2,
                    content:url,
                    area: ['550px', '400px']
                });
                return false;
            })
        });
    </script>

</body>
</html>
